Skip to content

Conversation

@mikeshng
Copy link
Contributor

What type of PR is this?
/kind enhancement

What does this PR do / why we need it:
The ArgoCD operator is already capable of deploying the argocd-agent's principal components. This PR adds support for deploying the argocd-agent's agent components as well, allowing users to use the ArgoCD operator to deploy both the principal and agent components.

Have you updated the necessary documentation?

  • Documentation update is required by this PR.
  • Documentation has been updated.

Which issue(s) this PR fixes:
Fixes #NA

How to test changes / Special notes to the reviewer:
I've intentionally avoided disrupting the existing Principal path to minimize regression risk. To keep concerns separated, this PR introduces an agent/ folder that mirrors the structure of the current Principal code. This separation is both safer (fewer unintended cross effects) and more future proof, since the Principal (server) and Agent (client) are likely to diverge further over time. While this does introduce some code duplication, sharing helpers between two components with distinct roles (server vs client) increases the chance that a change for one will accidentally impact the other. That's why I feel like clear boundaries are preferable here.
I also considered creating a principal folder and moving existing files, but that would add a lot inflate this PR. For now, the top level continues to represent the server (Principal), and the new agent folder represents the client, which still reflects a clean server–client structure without unnecessary file moves.

@mikeshng mikeshng force-pushed the add-agent-agent-components branch 5 times, most recently from 7fed99e to 8459234 Compare October 23, 2025 04:35
@mikeshng
Copy link
Contributor Author

/assign @jgwest @jparsai @svghadi

CC @jannfis

SecretKeyRef: &corev1.SecretKeySelector{
Key: AgentRedisPasswordKey,
LocalObjectReference: corev1.LocalObjectReference{
Name: AgentRedisSecretname,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be <argocd name>-redis-initial-password otherwise it will not work if instance name in not "argocd", it seems I missed it in principal as well https://github.com/argoproj-labs/argocd-operator/blob/master/controllers/argocdagent/deployment.go#L379

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed principal deployment #1926

@jparsai
Copy link
Collaborator

jparsai commented Oct 30, 2025

I tried it locally and connected it with principal, it worked for me.
It would be nice to have e2e test for this. E2E can not test actual scenario by connecting it with principal yet, but it verify that all agent resources are created successfully.

@mikeshng
Copy link
Contributor Author

mikeshng commented Oct 30, 2025

Thank you @jparsai for the review and related PRs. I am going to wait until #1925 and #1926 then resolve conflict and address your comments.

Edit: I've updated the PR to address the feedback.

@mikeshng mikeshng force-pushed the add-agent-agent-components branch from 8459234 to d1170cc Compare October 31, 2025 17:34
@jparsai
Copy link
Collaborator

jparsai commented Nov 3, 2025

Thanks Mike, both of my PRs are now merged.

@mikeshng
Copy link
Contributor Author

mikeshng commented Nov 3, 2025

Thanks Mike, both of my PRs are now merged.

Thank you. My PR has been updated as well.

@jparsai
Copy link
Collaborator

jparsai commented Nov 4, 2025

Thanks @mikeshng LGTM

@mikeshng mikeshng force-pushed the add-agent-agent-components branch from d1170cc to 8112fb4 Compare November 4, 2025 15:29
@mikeshng
Copy link
Contributor Author

mikeshng commented Nov 4, 2025

@jparsai I've rebased and ran make bundle. No new net changes besides creation timestamp differences on those CSV related files. Thanks for the review!

@mikeshng
Copy link
Contributor Author

mikeshng commented Nov 4, 2025

@jparsai sorry i think I messed up my rebase!

@mikeshng mikeshng force-pushed the add-agent-agent-components branch from 8112fb4 to d1170cc Compare November 4, 2025 15:43
@mikeshng mikeshng force-pushed the add-agent-agent-components branch from d1170cc to 81fcc4d Compare November 4, 2025 15:45
@mikeshng
Copy link
Contributor Author

mikeshng commented Nov 4, 2025

@jparsai OK much better now. My bad!

@jparsai
Copy link
Collaborator

jparsai commented Nov 4, 2025

LGTM

Copy link
Member

@jgwest jgwest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too, thanks @mikeshng for adding this very useful improvement to agent configuration, and thanks @jparsai for reviewing!

@jgwest jgwest merged commit d3bdb04 into argoproj-labs:master Nov 4, 2025
7 checks passed
@mikeshng mikeshng deleted the add-agent-agent-components branch November 4, 2025 20:20
@mikeshng
Copy link
Contributor Author

mikeshng commented Nov 5, 2025

Follow up PR: #1930

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants